package RestWS;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.MediaType;

import convert.CustomerBN;

@Path("/mytest")
public class Test {


	@POST
	@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public String  saveCustomer(CustomerBN jaxbcontent)
	{
		
		
		System.out.println("insert Customer  $$$$-----problem soleved");
		
		
	
	
		
		return "data  update is ok";
	}
	
	
	
	@PUT
	@Path("{id}")
	@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public String  updateCustomer(CustomerBN jaxbcontent,@PathParam("id") int id)
	{
		
		
		System.out.println("update Customer  $$$$-----problem soleved");
		
		
		System.out.println(id);
	
		
		return "data  update is ok";
	}
	
	
	
	@GET
	@Path("{id}")
	public String  getCustomer(@PathParam("id") int id)
	{
				
		System.out.println("GET Customer  $$$$-----problem soleved");
		
		System.out.println("id"+id);
				
		return "data  details is ok";
	}
	
	
	
	@DELETE
	@Path("{id}")
	public String  deleteCustomer(@PathParam("id") int id)
	{
				
		System.out.println("Delete  Customer  $$$$-----problem soleved");
		
		System.out.println("id"+id);
				
		return "data  delete is ok";
	}
	
	
}
